Disjunctive Normal Form Algorithm